package com.wjw.controller;

import com.wjw.entity.Carousel;
import com.wjw.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* (carousel)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/resources")
public class CarouselController {

    @Autowired
    private CarouselService carouselService;

    @RequestMapping(value = "/carousel")
    public Map getCarousel(){
        List<Carousel> carousel = carouselService.getCarousel();
        HashMap<String, Object> map = new HashMap<>();
        map.put("code","001");
        map.put("carousel",carousel);
        return map;
    }



}
